#include <gui/screen7_screen/Screen7View.hpp>
extern "C"
{
#include "user_include.h"
}

Screen7View::Screen7View()
{
}

void Screen7View::setupScreen()
{
    Screen7ViewBase::setupScreen();
}

void Screen7View::tearDownScreen()
{
    Screen7ViewBase::tearDownScreen();
}
void Screen7View::handleTickEvent(void)
{
    static int8_t tick = 0;
    static uint16_t para[4] = {1, 23, 34, 23};

    static uint8_t count = 0;
    struct tm t;
    uint8_t i = 0;
    tick++;
    if (tick % 30 == 0)
    {
        tick = 0;
        if (driver_button_struct.key_value == BUTTON2_PRESS_FLAG)
        {
            driver_button_struct.key_value = 0;
            application().gotoscreen2ScreenSlideTransitionEast();
        }
        count++;
        if (count >= 25)
        {
            count = 0;
        }
        driver_rtc_struct.read(&t);
        customContainer_1.widget_set(t, count);
        customContainer_2.widget_set(t, count * 2);
        customContainer_3.widget_set(t, count + 33);
        customContainer_4.widget_set(t, count * 4);
        customContainer_5.widget_set(t, count * 2);
        customContainer_6.widget_set(t, count);
        customContainer_1.invalidate();
        customContainer_2.invalidate();
        customContainer_3.invalidate();
        customContainer_4.invalidate();
        customContainer_5.invalidate();
        customContainer_6.invalidate();
    }
}